<!--
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<div class="ddp-ui-tab-contents">
  <div class="ddp-box-synch" *ngIf="datasource.fieldsMatched === false">
    <em class="ddp-icon-info"></em>
    {{'msg.storage.ui.dsource.synchronization.info' | translate}}
    <a href="javascript:" class="ddp-btn-blue" (click)="synchronizeFieldsModalOpen()">
      <em class="ddp-icon-btn-sync"></em>{{'msg.storage.ui.dsource.synchronization.btn' | translate}}
    </a>
  </div>
  <div class="ddp-box-synch type-info" *ngIf="isShowModifiedGuideMessage">
    <div class="ddp-txt-synch">
      <em class="ddp-icon-info"></em>
      {{'msg.storage.ui.guide.meta.modified' | translate}}
    </div>
    <a href="javascript:" class="ddp-btn-info-close" (click)="isShowModifiedGuideMessage = false"></a>
  </div>
  <!-- datadetail -->
  <div class="ddp-ui-datadetail ddp-border-none">
    <a href="javascript:" class="ddp-btn-solid2 ddp-dark type-link" (click)="onClickLinkMetadata()" *ngIf="isShowLinkMetadata()">{{'msg.storage.btn.master.data.link' | translate}}</a>
    <label class="ddp-label-detail">{{'msg.storage.ui.data.info' | translate}}</label>
    <table class="ddp-table-detail">
      <colgroup>
        <col width="170px">
        <col width="*">
      </colgroup>
      <tbody>
      <tr>
        <th>
          {{'msg.comm.ui.description' | translate}}
        </th>
        <td>
          <div class="ddp-edit-description ddp-line" [class.ddp-edit]="isEditSourceDescription" >
            <!-- data -->
            <div class="ddp-data-description" (click)="enableEditDescription()">
              <div class="ddp-txt-description" [class.ddp-nodata]="!datasource.description || datasource.description.length === 0" [innerHTML]="getConvertedSourceDescription()">
              </div>
              <a href="javascript:" class="ddp-btn-edit"><em class="ddp-icon-edit"></em>{{'msg.comm.btn.edit' | translate}}</a>
            </div>
            <!-- //data -->
            <div class="ddp-box-textarea">
              <textarea [(ngModel)]="descriptionChangeText" (blur)="onClickDescriptionOutside($event)" maxlength="150" placeholder="{{'msg.storage.ph.source.desc' | translate}}"></textarea>
              <div class="ddp-textarea-buttons">
                <a href="javascript:" class="ddp-box-btn" (click)="isEditSourceDescription = false; isShowModifiedGuideMessage = false"><em class="ddp-icon-cancel"></em></a>
                <a href="javascript:" class="ddp-box-btn " (click)="updateSourceDescription()"><em class="ddp-icon-check"></em></a>
              </div>
            </div>
          </div>
        </td>
      </tr>
      </tbody>

    </table>
    <!-- Data info -->
    <table class="ddp-table-detail">
      <colgroup>
        <col width="170px">
        <col width="*">
      </colgroup>
      <tbody>
      <!-- table name -->
      <tr>
        <th>
          {{'msg.storage.ui.physical.name' | translate}}
        </th>
        <td>
          {{datasource.engineName}}
        </td>
      </tr>
      <!-- //table name -->
      <!-- data type -->
      <tr>
        <th>
          {{'msg.storage.th.ingestion_type' | translate}}
        </th>
        <td>
          {{(datasource.connType === dsConnType.ENGINE ? 'msg.storage.ui.list.ingested.data' : 'msg.storage.ui.list.linked.data') | translate}}
        </td>
      </tr>
      <!-- //data type -->
      <!-- 상태 -->
      <tr>
        <th>
          {{'msg.storage.th.status' | translate}}
        </th>
        <td>
          <!-- status -->
          <div class="ddp-ui-status-type">
            <div class="ddp-top-status">
              <span class="ddp-data-status {{getSourceStatusClass(datasource.status)}}">{{datasource.status}} </span>
              <a href="javascript:" class="ddp-link-detail"
                 *ngIf="datasource.status === dsStatus.FAILED"
                 (click)="onClickIngestionDetails()">{{'msg.comm.detail.details' | translate}}</a>
            </div>
            <!-- box -->
            <div class="ddp-box-status" *ngIf="!isNotShowProgress && (datasource.status === dsStatus.FAILED || datasource.status === dsStatus.PREPARING || datasource.status === dsStatus.ENABLED)">
              <!-- stagingDB -->
              <ng-container *ngIf="isHiveType()">
                <div class="ddp-list-status">
                  <!-- Druid 적재 -->
                  <div class="ddp-status"
                       [class.ddp-finish]="ingestionProcessStatusStep >= 2"
                       [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 2">
                    <span class="ddp-num">1</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-2' | translate}}</span>
                    <em class="ddp-line"
                        [class.type-dotted]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 2"
                        [class.type-finish]="ingestionProcessStatusStep < 2 || (datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 2)"></em>
                  </div>
                  <!-- //Druid 적재 -->
                  <!-- 상태확인 -->
                  <div class="ddp-status"
                    [class.ddp-finish]="ingestionProcessStatusStep >= 3"
                    [class.ddp-ing]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 2"
                    [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 3">
                    <span class="ddp-num">2</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-3' | translate}}</span>
                    <em class="ddp-line"
                        [class.type-dotted]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 3"
                        [class.type-finish]="ingestionProcessStatusStep < 3  || (datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 3)"></em>
                  </div>
                  <!-- //상태확인 -->
                  <!-- 완료 -->
                  <div class="ddp-status"
                       [class.ddp-finish]="datasource.status === dsStatus.ENABLED && ingestionProcessStatusStep === 4"
                       [class.ddp-ing]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 3"
                       [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 4">
                    <span class="ddp-num">3</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-4' | translate}}</span>
                  </div>
                  <!-- //완료 -->
                </div>
              </ng-container>
              <!-- //stagingDB -->
              <!-- DB -->
              <ng-container *ngIf="!isHiveType()">
                <div class="ddp-list-status">
                  <!-- 데이터 이관 -->
                  <div class="ddp-status"
                       [class.ddp-finish]="ingestionProcessStatusStep >= 1"
                       [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 1">
                    <span class="ddp-num">1</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-1' | translate}}</span>
                    <em class="ddp-line"
                        [class.type-dotted]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 1"
                        [class.type-finish]="ingestionProcessStatusStep < 1 || (datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 1)"></em>
                  </div>
                  <!-- //데이터 이관 -->
                  <!-- Druid 적재 -->
                  <div class="ddp-status"
                       [class.ddp-finish]="ingestionProcessStatusStep >= 2"
                       [class.ddp-ing]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 1"
                       [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 2">
                    <span class="ddp-num">2</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-2' | translate}}</span>
                    <em class="ddp-line"
                        [class.type-dotted]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 2"
                        [class.type-finish]="ingestionProcessStatusStep < 2 || (datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 2)"></em>
                  </div>
                  <!-- //Druid 적재 -->
                  <!-- 상태확인 -->
                  <div class="ddp-status"
                       [class.ddp-finish]="ingestionProcessStatusStep >= 3"
                       [class.ddp-ing]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 2"
                       [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 3">
                    <span class="ddp-num">3</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-3' | translate}}</span>
                    <em class="ddp-line"
                        [class.type-dotted]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 3"
                        [class.type-finish]="ingestionProcessStatusStep < 3 || (datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 3)"></em>
                  </div>
                  <!-- //상태확인 -->
                  <!-- 완료 -->
                  <div class="ddp-status"
                       [class.ddp-finish]="datasource.status === dsStatus.ENABLED && ingestionProcessStatusStep === 4"
                       [class.ddp-ing]="datasource.status === dsStatus.PREPARING && ingestionProcessStatusStep === 3"
                       [class.ddp-fail]="datasource.status === dsStatus.FAILED && ingestionProcessStatusStep === 4">
                    <span class="ddp-num">4</span>
                    <span class="ddp-txt-status">{{'msg.storage.ui.ingestion.step-4' | translate}}</span>
                  </div>
                  <!-- //완료 -->
                </div>
              </ng-container>
              <!-- //DB -->
            </div>
            <!-- //box -->
          </div>
          <!-- //status -->
        </td>
      </tr>
      <!-- //상태 -->
      <!-- size -->
      <tr *ngIf="(isEnabled() || isDisabled()) && getSummary">
        <th>
          {{'msg.storage.ui.th.row.count' | translate}} ({{'msg.comm.detail.size' | translate}})
        </th>
        <td>
          {{getSummary.count | numberCommas}} ({{bytesToSize(getSummary.size)}})
        </td>
      </tr>
      <!-- //size -->
      <!-- Granularity -->
      <tr>
        <th>
          {{'msg.storage.th.gran.settings' | translate}}
        </th>
        <td>
          <div class="ddp-wrap-edit3 ddp-type">
            <label class="ddp-label-type">{{'msg.storage.th.query.gran' | translate}}
            </label>
            <!-- edit option -->
            <div class="ddp-ui-edit-option">
              {{getGranularity}}
            </div>
            <!-- //edit option -->
          </div>
          <div class="ddp-wrap-edit3 ddp-type">
            <label class="ddp-label-type">{{'msg.storage.th.segment.gran' | translate}}
            </label>
            <!-- edit option -->
            <div class="ddp-ui-edit-option">
              {{getSegGranularity}}
            </div>
            <!-- //edit option -->
          </div>
          <div class="ddp-wrap-edit3 ddp-type" *ngIf="(isEnabled() || isDisabled()) && getSummary">
            <label class="ddp-label-type">{{'msg.storage.ui.intervals' | translate}}
            </label>
            <!-- edit option -->
            <div class="ddp-ui-edit-option">
              {{convertTime(getSummary.ingestionMinTime.toString(), getSegGranularity)}} ~ {{convertTime(getSummary.ingestionMaxTime.toString(), getSegGranularity)}}
            </div>
            <!-- //edit option -->
          </div>
        </td>
      </tr>
      <!-- //Granularity -->
      <!-- 히스토그램 -->
      <tr *ngIf="isEnabled() && !isLinkedSource()">
        <th>
          {{'msg.storage.th.histogram' | translate}}
        </th>
        <td>
          <div class="ddp-box-histogram">
            <div class="ddp-box-graph" #histogram>
              <div class="ddp-data-empty">
                <span class="ddp-data-contents ">{{'msg.storage.ui.no.data' | translate}}</span>
              </div>
            </div>
            <div class="ddp-wrap-link-detail" (clickOutside)="detailFl=false">
              <a href="javascript:" class="ddp-link-detail" (click)="detailFl = !detailFl">{{'msg.storage.th.detail' | translate}}</a>
              <div class="ddp-box-layout4" [style.display]="detailFl ? 'block' : 'none'">
               <a href="javascript:" class="ddp-btn-close" (click)="detailFl = false"></a>
                <div class="ddp-wrap-data-detail">
                  <div class="ddp-ui-top-title">
                    {{'msg.storage.ui.title.data.detail' | translate}}
                  </div>
                  <ul class="ddp-list-data-detail">
                    <li *ngIf="!histogramSegment">
                      {{'msg.storage.ui.no.data' | translate}}
                    </li>
                    <li *ngFor="let segment of histogramSegment">
                      <span class="ddp-data-date">{{convertTime(segment.interval.split('/')[0], getSegGranularity)}}</span>
                      <span class="ddp-data-size">{{bytesToSize(segment.serializedSize)}}</span>
                    </li>
                  </ul>
                </div>
              </div>
            </div>
            <!-- //link detail -->
          </div>
        </td>
      </tr>
      <!-- //히스토그램 -->
      </tbody>
    </table>
    <!-- //Data info -->
    <!-- publish -->
    <div class="ddp-wrap-table-detail" *ngIf="isEnabled() || isDisabled()">
      <!-- edit -->
      <div class="ddp-wrap-edit3 ddp-type">
        <label class="ddp-label-type ddp-normal">{{'msg.storage.ui.permission' | translate}}</label>
        <!-- edit option -->
        <div class="ddp-ui-edit-option">
          <label class="ddp-label-checkbox">
            <input type="checkbox" [checked]="getPublished" (click)="confirmModalEvent('published'); $event.preventDefault()">
            <i class="ddp-icon-checkbox"></i>
            <span class="ddp-txt-checkbox">{{'msg.storage.ui.permission.choice' | translate}}</span>
          </label>
          <div class="ddp-wrap-data-group" *ngIf="!getPublished">
            <a href="javascript:" class="ddp-link-edit2" (click)="setWorkspaceOpen()">{{'msg.storage.btn.edit' | translate}}</a>
            <!-- data group -->
            <span class="ddp-data-group">
                <em class="ddp-icon-user-s2"></em>
                <strong>{{getLinkedWorkspaces ? getLinkedWorkspaces : 0}}</strong> {{'msg.storage.ui.conn.create.workspace' | translate}}
            </span>
          </div>
          <div class="ddp-wrap-data-group" *ngIf="getPublished">
            <span class="ddp-data-group">
                <em class="ddp-icon-user-s2"></em>
                {{'msg.storage.ui.conn.create.all.workspace' | translate}}
            </span>
          </div>
        </div>
        <!-- //edit option -->
      </div>
      <!-- //edit -->
    </div>
    <!-- //publish -->
    <!-- ingestion -->
    <div class="ddp-wrap-table-detail ddp-last" *ngIf="getIngestion">
      <label class="ddp-label-detail">{{'msg.storage.ui.ingestion.info' | translate}}</label>
      <table class="ddp-table-detail">
        <colgroup>
          <col width="170px" />
          <col width="*" />
        </colgroup>
        <tbody>
        <tr>
          <th>
            {{'msg.storage.th.master.data' | translate}}
          </th>
          <td>
            <!-- edit -->
            <div class="ddp-wrap-edit3 ddp-type">
              <label class="ddp-label-type">{{'msg.comm.th.type' | translate}}
              </label>
              <!-- edit option -->
              <div class="ddp-ui-edit-option">
                {{getMasterDataInfo(datasource.srcType)}}
              </div>
              <!-- //edit option -->
            </div>
            <!-- //edit -->
            <!-- only snapshot type (STAGING_DB) -->
            <ng-container *ngIf="datasource.srcType === dsSrcType.SNAPSHOT && datasource.snapshot.ssType === snSsType.STAGING_DB">
              <!-- Database -->
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.storage.li.db' | translate}}</label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{datasource.snapshot.dbName}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //Database -->
              <!-- Table -->
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.storage.btn.table' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{datasource.snapshot.tblName}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //Table -->
            </ng-container>
            <!-- //only snapshot type (STAGING_DB) -->
            <!-- only file type -->
            <ng-container *ngIf="isFileType()">
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.storage.ui.file.name' | translate}}</label>
                 <!-- edit option -->
                <div class="ddp-ui-edit-option">
                {{datasource.ingestion.uploadFileName}}
                </div>
                <!-- //edit option -->
              </div>
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="datasource.ingestion.format && datasource.ingestion.format.sheetName">
                <label class="ddp-label-type">{{'msg.storage.ui.sheet' | translate}}</label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{datasource.ingestion.format.sheetName}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //edit -->
            </ng-container>
            <!-- //only file type -->
            <!-- only database type -->
            <ng-container *ngIf="isJdbcType()">
              <!-- host -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="isDefaultType()">
                <label class="ddp-label-type">{{'msg.comm.th.host' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getConnection.hostname}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //host -->
              <!-- port -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="isDefaultType()">
                <label class="ddp-label-type">{{'msg.comm.th.port' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getConnection.port}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //port -->
              <!-- URL -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="!isDefaultType()">
                <label class="ddp-label-type">{{'msg.storage.ui.conn.url' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getConnection.url}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //URL -->
              <!-- database -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="isDefaultType() && getConnection.database">
                <label class="ddp-label-type">{{'msg.storage.li.db' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getConnection.database}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //database -->
              <!-- catalog -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="isDefaultType() && getConnection.catalog">
                <label class="ddp-label-type">{{'msg.storage.th.catalog' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getConnection.catalog}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //catalog -->
              <!-- sid -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="isDefaultType() && getConnection.sid">
                <label class="ddp-label-type">{{'msg.storage.th.sid' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getConnection.sid}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //sid -->
              <!-- table -->
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.storage.li.db' | translate}} / {{'msg.storage.btn.table' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  <div class="ddp-data-detail">
                  <span class="ddp-txt-detail">{{getIngestionDatabase}} / {{getIngestionTableOrQuery}}
                  <a href="javascript:" class="ddp-link-detail" *ngIf="getIngestionDataType === 'QUERY'"
                     (click)="queryDetailOpen()"> {{'msg.storage.btn.detail' | translate}} &gt;</a>
                  </span>
                  </div>
                </div>
                <!-- //edit option -->
              </div>
              <!-- //table -->
              <!-- JDBC URL -->
              <div class="ddp-wrap-edit3 ddp-type" *ngIf="getConnection">
                <label class="ddp-label-type">{{'msg.storage.th.jdbc.url' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  <div class="ddp-data-detail">
                  <span class="ddp-txt-detail">{{getConnection.connectUrl}}
                  </span>
                  </div>
                </div>
                <!-- //edit option -->
              </div>
              <!-- //JDBC URL -->
            </ng-container>
            <!-- //only database type -->
            <!-- only stagingDB type -->
            <ng-container *ngIf="isHiveType()">
              <!-- Database -->
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.storage.li.db' | translate}} / {{'msg.storage.btn.table' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getStagingDbSource}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //Database -->
            </ng-container>
            <!-- //only stagingDB type -->
            <!-- only Realtime type -->
            <ng-container *ngIf="isRealtimeType()">
              <!-- Database -->
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.comm.th.url' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getIngestion.consumerProperties["bootstrap.servers"]}}
                </div>
                <!-- //edit option -->
              </div>
              <div class="ddp-wrap-edit3 ddp-type">
                <label class="ddp-label-type">{{'msg.storage.ui.stream.kafka.topic' | translate}}
                </label>
                <!-- edit option -->
                <div class="ddp-ui-edit-option">
                  {{getIngestion.topic}}
                </div>
                <!-- //edit option -->
              </div>
              <!-- //Database -->
            </ng-container>
            <!-- //only Realtime type -->
          </td>
        </tr>
        </tbody>
      </table>
      <!-- ingestion settings -->
      <table class="ddp-table-detail" *ngIf="isJdbcType()">
        <colgroup>
          <col width="170px" />
          <col width="*" />
        </colgroup>
        <tbody>
        <tr>
          <th>
            {{(getConnType === dsConnType.ENGINE ? 'msg.storage.th.ingestion-settings' : 'msg.storage.th.dsource-expire') | translate}}
          </th>
          <td>
            <div class="ddp-ui-summary">
              <!-- Engine 형 -->
              <span class="ddp-data-txt" *ngIf="getConnType === dsConnType.ENGINE">{{(getIngestion.type === 'single' ? 'msg.storage.th.ingest-once' : 'msg.storage.th.ingest-prcdly') | translate}}
              </span>
              <ul class="ddp-list-sub" *ngIf="getConnType === dsConnType.ENGINE">
                <li *ngIf="getIngestion.type != 'single'">
                  {{'msg.dp.th.status' | translate}} : {{getIngestionStatusLabel}}
                  <a href="javascript:" class="ddp-box-btn-r" *ngIf="schedulingStatus === 'PAUSED'" (click)="resumeSchedulingJob();"><em class="ddp-icon-play"></em></a>
                  <a href="javascript:" class="ddp-box-btn-r" *ngIf="schedulingStatus === 'NORMAL'" (click)="pauseSchedulingJob();"><em class="ddp-icon-pause"></em></a>
                </li>
                <li>
                  {{'msg.storage.th.scope-ingest' | translate}} : {{getIngestionScopeLabel()}}
                </li>
                <li *ngIf="getIngestionPeriod">
                  {{'msg.storage.th.batch-cycle' | translate}} : {{getIngestionBatchLabel()}} /
                  <span *ngIf="getIngestionPeriod.frequency === 'HOURLY'">{{getIngestionPeriod.value}}</span>
                  <span *ngIf="getIngestionPeriod.frequency === 'MINUTELY'">{{getIngestionPeriod.value}}</span>
                  <span *ngIf="getIngestionPeriod.frequency === 'DAILY'">{{getIngestionPeriod.time}}</span>
                  <span *ngIf="getIngestionPeriod.frequency === 'WEEKLY'">{{getIngestionBatchWeekLabel}} / {{getIngestionPeriod.time}}</span>
                  <span *ngIf="getIngestionPeriod.frequency === 'EXPR'">{{getIngestionPeriod.value}}</span>
                  <a href="javascript:" class="ddp-link-detail" (click)="batchHistoryOpen()"> {{'msg.storage.ui.batch-history'| translate }} &gt;</a>
                </li>
                <li *ngIf="getIngestion.maxLimit">
                  {{'msg.storage.th.max-query-row' | translate}} : {{getIngestion.maxLimit}}
                </li>
              </ul>
              <!-- //Engine 형 -->
              <!-- Link 형 -->
              <ul class="ddp-list-sub" *ngIf="getConnType === dsConnType.LINK">
                <li>
                  {{'msg.storage.th.time-interval' | translate}} : {{getIngestionExpired()}}
                </li>
              </ul>
              <!-- //Link 형 -->
            </div>
          </td>
        </tr>
        </tbody>
      </table>
      <!-- //ingestion settings -->
      <!-- partition settings -->
      <table class="ddp-table-detail" *ngIf="isHiveType() || (datasource.srcType === dsSrcType.SNAPSHOT && datasource.snapshot.ssType === snSsType.STAGING_DB)">
        <colgroup>
          <col width="170px" />
          <col width="*" />
        </colgroup>
        <tbody>
        <tr>
          <th>
            {{'msg.storage.th.gran.settings' | translate}}
          </th>
          <td>
            <!-- partition keys -->
            <div class="ddp-wrap-edit3 ddp-type">
              <label class="ddp-label-type">{{'msg.storage.th.partition-keys' | translate}}</label>
              <!-- edit option -->
              <div class="ddp-ui-edit-option">
                <div class="ddp-wrap-list-detail">
                  <span class="ddp-list-detail" *ngFor="let key of partitionKeyList">{{key}}</span>
                </div>
              </div>
              <!-- //edit option -->
            </div>
            <!-- //partition keys -->
          </td>
        </tr>
        </tbody>
      </table>
      <!-- //partition settings -->
      <!-- roll up -->
      <table class="ddp-table-detail">
        <colgroup>
          <col width="170px" />
          <col width="*" />
        </colgroup>
        <tbody>
        <tr>
          <th>
            {{'msg.storage.th.rollup.settings' | translate}}
          </th>
          <td>
            {{(getIngestion.rollup ? 'msg.storage.ui.set.true' : 'msg.storage.ui.set.false') | translate}}
          </td>
        </tr>
        </tbody>
      </table>
      <!-- //roll up -->
      <!-- advanced -->
      <div class="ddp-detail-setting" [class.ddp-selected]="isShowAdvancedSetting" *ngIf="isEnableAdvancedSettings()">
        <a href="javascript:" class="ddp-fold-link" (click)="isShowAdvancedSetting = !isShowAdvancedSetting">{{'msg.storage.th.advanced.setting' | translate}}</a>
        <div class="ddp-wrap-down">
          <table class="ddp-table-detail ddp-mgt0 ddp-setting">
            <colgroup>
              <col width="170px">
              <col width="*">
            </colgroup>
            <tbody>
            <!-- tuning config -->
            <tr *ngIf="getIngestion.tuningOptions">
              <th>{{'msg.storage.ui.tuning.settings' | translate}}</th>
              <td>
                <div class="ddp-wrap-edit3 ddp-type" *ngFor="let key of getObjectKeys(getIngestion.tuningOptions)">
                  <label class="ddp-label-type">{{key}}
                  </label>
                  <!-- edit option -->
                  <div class="ddp-ui-edit-option">
                    {{getIngestion.tuningOptions[key]}}
                  </div>
                  <!-- //edit option -->
                </div>
              </td>
            </tr>
            <!-- //tuning config -->
            <!-- job properties -->
            <tr *ngIf="getIngestion.jobProperties">
              <th>{{'msg.storage.ui.dsource.create.job.properties' | translate}}</th>
              <td>
                <div class="ddp-wrap-edit3 ddp-type" *ngFor="let key of getObjectKeys(getIngestion.jobProperties)">
                  <label class="ddp-label-type">{{key}}
                  </label>
                  <!-- edit option -->
                  <div class="ddp-ui-edit-option">
                    {{getIngestion.jobProperties[key]}}
                  </div>
                  <!-- //edit option -->
                </div>
              </td>
            </tr>
            <!-- //job properties -->
            </tbody>
          </table>

        </div>
      </div>
      <!-- //advanced -->
    </div>
    <!-- //ingestion -->
  </div>
  <!-- //datadetail -->
</div>

<!-- 워크스페이스 지정 모달 -->
<app-set-workspace-published
  id="set-workspace-modal"
  (complete)="updateWorkspaces($event)"></app-set-workspace-published>
<!-- 쿼리 디테일 -->
<query-detail></query-detail>
<!-- 배치 히스토리 -->
<batch-history id="batch-history-modal"></batch-history>

<app-confirm-modal (confirm)="confirmSynchronizeFields()"></app-confirm-modal>
<!-- ingestion result details -->
<ingestion-log-details></ingestion-log-details>


